package com.zdj.proxy.cglib;

import net.sf.cglib.proxy.Enhancer;

/**
 * @author zhangdj
 * @date 2021-10-12 16:56:39
 */
public class Main {
    public static void main(String[] args) {
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(Target.class);
        enhancer.setCallback(new MyMethodInterceptor());
        Target proxy = (Target) enhancer.create();
        proxy.handle();
    }
}
